{% extends "base.html" %}

{% block content %}
    <h2>批量添加积分记录</h2>
    <form method="POST">
        <div class="mb-3">
            <label for="account" class="form-label">账号</label>
            <input type="text" class="form-control" id="account" name="account"
                   value="{{ account_filter }}" required>
        </div>
        <div class="row mb-3">
            <div class="col-md-6">
                <label for="start_date" class="form-label">开始日期</label>
                <input type="date" class="form-control" id="start_date" name="start_date"
                       value="{{ default_start_date }}" required>
            </div>
            <div class="col-md-6">
                <label for="end_date" class="form-label">结束日期</label>
                <input type="date" class="form-control" id="end_date" name="end_date"
                       value="{{ default_end_date }}" required>
            </div>
        </div>
        <div class="alert alert-info">
            将批量添加从 <strong>{{ default_start_date }}</strong> 到 <strong>{{ default_end_date }}</strong> 的所有记录
        </div>
        <div class="mb-3">
            <label for="balance" class="form-label">余额积分</label>
            <input type="number" class="form-control" id="balance" name="balance" required>
        </div>
        <div class="mb-3">
            <label for="transaction" class="form-label">交易量积分</label>
            <input type="number" class="form-control" id="transaction" name="transaction" required>
        </div>
        <div class="mb-3">
            <label for="consumption" class="form-label">消耗积分</label>
            <input type="number" class="form-control" id="consumption" name="consumption" required>
        </div>
        <div class="mb-3">
            <label for="remark" class="form-label">备注</label>
            <textarea class="form-control" id="remark" name="remark" rows="3"></textarea>
        </div>
        <button type="submit" class="btn btn-primary">批量添加</button>
        <a href="/" class="btn btn-secondary">取消</a>
    </form>
{% endblock %}